*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}
#container{
    width: 300px;
    height: 300px;
    /* border: 1px solid black; */
    margin: 100px auto;
    perspective: 20000px;
}
#box{
    width: 300px;
    height: 300px;
    position: relative;
    transform-style: preserve-3d;
    /* transform: rotateX(45deg) rotateY(45deg); */
    animation: ro 8s linear infinite;
}
@keyframes ro {
    0%{
        transform: rotateX(0deg) rotateY(0deg);
    }
    100%{
        transform: rotateX(360deg) rotateY(180deg);
    }
}
.box-page{
    width: 300px;
    height: 300px;
    position: absolute;
}
.left{
    /* background-color: aqua; */
    background-color: transparent;
    transform: translateX(-150px) rotateY(90deg);
    transform-style: preserve-3d;
}
.right{
    /* background-color: red; */
    background-color: transparent;
    transform: translateX(150px) rotateY(90deg);
    transform-style: preserve-3d;
}
.top{
    /* background-color: orange; */
    background-color: transparent;
    transform: translateZ(150px);
    transform-style: preserve-3d;
}
.bottom{
    /* background-color: pink; */
    background-color: transparent;
    transform: translateZ(-150px);
    transform-style: preserve-3d;
}
.front{
    /* background-color: blue; */
    background-color: transparent;
    transform: translateY(150px) rotateX(90deg);
    transform-style: preserve-3d;
}
.back{
    /* background-color: yellow; */
    background-color: transparent;
    transform: translateY(-150px) rotateX(90deg);
    transform-style: preserve-3d;
}
.box-page div:nth-child(1){
    animation: a1 4.5s ease-in;
}
.box-page div:nth-child(2){
    animation: a1 4.5s ease-in 0.5s;
}
.box-page div:nth-child(3){
    animation: a1 4.5s ease-in 0.9s;
}
.box-page div:nth-child(4){
    animation: a1 4.5s ease-in 1.3s;
}
.box-page div:nth-child(5){
    animation: a1 4.5s ease-in 1.7s;
}
.box-page div:nth-child(6){
    animation: a1 4.5s ease-in 2.1s;
}
.box-page div:nth-child(7){
    animation: a1 4.5s ease-in 2.5s;
}
.box-page div:nth-child(8){
    animation: a1 4.5s ease-in 2.9s;
}
.box-page div:nth-child(9){
    animation: a1 4.5s ease-in 3.3s;
}
@keyframes a1{
    0%{
        transform: translateZ(0px) scale(1) rotateZ(0deg);
    }
    30%{
        transform: translateZ(300px) scale(0) rotateZ(720deg);
    }
    60%{
        transform: translateZ(300px) scale(0) rotateZ(720deg);
    }
    100%{
        transform: translateZ(0px) scale(1) rotateZ(0deg);
    }
}
